import sign from "./sign";
export const dewuHeader = {
    accept: '*/*',
    appid: 'wxapp',
    appversion: '4.4.0',
    platform: 'h5',
    // referer: 'https://servicewechat.com/wx3c12cdd0ae8b1a7b/137/page-frame.html',
    'context-type': 'application/x-www-form-urlencoded',
    // 'wxapp-login-token': '3f885cf3|5805b23362561089694d1976c3f2ea84|1843f86c|13d7302d',
    'user-agent': 'Mozilla/5.0 (iPad; CPU OS 13_4_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 MicroMessenger/7.0.15(0x17000f2d) NetType/WIFI Language/zh_CN',
    'accept-language': 'zh-cn'
};
export function getDewuQueryStr(query) {
    query.sign = sign(query)
    return Object.keys(query)
        .map((key) => key + '=' + encodeURIComponent(query[key]))
        .join('&')
};